<template>
    <view class="loadEffect" v-if="show">
        <view class="loader-02"></view>
    </view>
</template>

<script>
export default {
    name: "loading",
    props: {
        show: {
            type: Boolean,
            default: true
        }
    },
    data() {
        return {

        };
    }
}
</script>

<style lang="scss" scoped>
.loadEffect {
  position: fixed;
  top: 45%;
  left: 0;
  right: 0;
  z-index: 100;
  text-align: center;
}

[class*="loader-"] {
  display: inline-block;
  width: 60rpx;
  height: 60rpx;
  color: inherit;
  vertical-align: middle;
  pointer-events: none;
  color: $base;
}

.loader-02 {
  border: 10rpx solid transparent;
  border-left-color: currentcolor;
  border-right-color: currentcolor;
  border-radius: 50%;
  -webkit-animation: 1s loader-02 linear infinite;
  animation: 1s loader-02 linear infinite;
}

@-webkit-keyframes loader-02 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loader-02 {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
</style>
